Image data obtained by capturing the image of a subject with a digital camera is stored in a personal computer (PC) or a mobile terminal or is stored with a network service. An image corresponding to the image data is printed on a sheet of paper as appropriate. For example, the sheet of paper is put in an album or is provided for a friend or an acquaintance.
A viewer who has seen the image printed on the sheet of paper may want to know where the original image data corresponding to the image is stored or when and where the image capturing has been performed. In such a case, the viewer causes pieces of image data stored in a PC and a mobile terminal and pieces of image data stored with a network service to be displayed on a display screen as images one by one and visually checks them until the target image data is found.
There is a technique for encoding the header part of a received e-mail to generate a barcode, merging the barcode into an image on which the body part of the e-mail is output, and printing the image (see, for example, Japanese Laid-open Patent Publication No. 2006-180342). In this technique, processing for decoding the barcode included in image data corresponding to a read document to acquire the header part and transmitting the image data to a transmission destination determined on the basis of the acquired header part is performed.
There is also a technique for printing a barcode (QR code (registered trademark)) on a photograph (see, for example, Japanese Laid-open Patent Publication No. 2011-2597). In this technique, an average value H of background colors around a position at which a QR code is to be placed is calculated. At the time of generation of a QR code, on the basis of a luminance level difference H′ with which a QR code becomes readable, a white part of the QR code is set to H+H′ and a black part of the QR code is set to H−H′.